<template>
  <div>
    <div class="herbalshopping">
      <div class="herbalshopping_product" v-for="item of productsPublic" :key="item.index">
        <div class="herbalshopping_product_img1">
          <img :src="item.img" alt>
        </div>
        <p class="herbalshopping_productname">{{item.title}}</p>
        <div class="herbalshopping_price">
          <p>￥{{item.price}}</p>
          <p>
            <img src="../../../../public/img/footer/shopcar.png" alt>
          </p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["productsPublic"],
  data() {
    return {
      
    };
  },
  created() {
      console.log(this.productsPublic);
  },
  methods: {}
};
</script>

<style scoped>
/* 商品样式 */
div.herbalshopping {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 95%;
  margin: 0 auto;
}
div.herbalshopping div.herbalshopping_product {
  width: 49%;
}
div.herbalshopping_product{
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0px 0px 5px 5px #f6f6f7;
    background: #FFFFFF;
}
div.herbalshopping_product_img1 img {
  width: 100%;
  height: 190px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
p.herbalshopping_productname {
  color: #2b2b2b;
  font-size: 16px;
  width: 95%;
  margin:0 auto;
}
div.herbalshopping_price {
  display: flex;
  justify-content: space-between;
  color: #de2a29;
  font-size: 14px;
  width: 95%;
  margin:0 auto;
}
div.herbalshopping_price img {
  height: 21px;
  width: 21px;
}
</style>
